package com.huika.renrench.control.my.account;

import android.widget.TextView;

import com.huika.lib.utils.MoneyShowTool;
import com.huika.renrench.R;
import com.huika.renrench.control.common.base.BaseAct;
import com.huika.renrench.support.bean.AccountPropertyBean;
import com.huika.renrench.view.TitleBarHelper;
/**
 * @author chenyuan
 * @date：2015年6月2,下午2:15:30
 * @describe:资产统计activity
 */
public class PropertyTotalActivity extends BaseAct {
	
	private TextView assets1;
	private TextView assets2;
	private TextView assets3;
	private TextView assets4;
	private TextView assets5;
	private TextView assets6;
	private TextView assets7;
	private TextView assets8;
	private TextView assets9;
	private TextView assets10;
	
	
	private AccountPropertyBean bean;
	@Override
	public void setRootView() {
		// TODO Auto-generated method stub
		setContentView(R.layout.activity_property_total);
		TitleBarHelper barHelper=new TitleBarHelper(this, R.string.common_null, R.string.common_null, R.string.common_null);
		barHelper.setTitleMsg("资产统计");
		barHelper.setLeftMsg("返回");
		bean = (AccountPropertyBean) getIntent().getSerializableExtra("accountPropertyBean");
		
		
		assets1=(TextView) findViewById(R.id.text_trading_account_assets1);
		assets2=(TextView) findViewById(R.id.text_trading_account_assets2);
		assets3=(TextView) findViewById(R.id.text_trading_account_assets3);
		assets4=(TextView) findViewById(R.id.text_trading_account_assets4);
		assets5=(TextView) findViewById(R.id.text_trading_account_assets5);
		assets6=(TextView) findViewById(R.id.text_trading_account_assets6);
		assets7=(TextView) findViewById(R.id.text_trading_account_assets7);
		assets8=(TextView) findViewById(R.id.text_trading_account_assets8);
		assets9=(TextView) findViewById(R.id.text_trading_account_assets9);
		assets10= (TextView) findViewById(R.id.text_trading_account_assets10);
		
		setData();
		
	}

	private void setData(){
		if (null!=bean) {
			assets1.setText("¥ "+String.valueOf(MoneyShowTool.twolastDF(bean.rechargeAmount)));
			assets2.setText("¥ "+String.valueOf(MoneyShowTool.twolastDF(bean.withdrawAmount)));
			assets3.setText("¥ "+String.valueOf(MoneyShowTool.twolastDF(bean.frozenBalance)));
			assets4.setText("¥ "+String.valueOf(MoneyShowTool.twolastDF(bean.investAmount)));
			assets5.setText("¥ "+String.valueOf(MoneyShowTool.twolastDF(bean.investRevenue)));
			assets6.setText("¥ "+String.valueOf(MoneyShowTool.twolastDF(bean.rechargeAmount-bean.withdrawAmount+bean.investRevenue-bean.revenueFeeAmount)));
			assets7.setText("¥ "+String.valueOf(MoneyShowTool.twolastDF(bean.rechargeAmount-bean.withdrawAmount+bean.investRevenue-bean.frozenBalance-bean.investAmount-bean.revenueFeeAmount)));
			assets8.setText("¥ "+String.valueOf(MoneyShowTool.twolastDF(bean.frozenBalance)));
			assets9.setText("¥ "+String.valueOf(MoneyShowTool.twolastDF(bean.investAmount)));
			assets10.setText("¥ "+String.valueOf(MoneyShowTool.twolastDF(bean.revenueFeeAmount)));
		}
	}
	

}
